#pragma once
#include "Syntax/Object/Object.hpp"
#include <string>

class Boolean : public Object
{
public:
    bool Value;

public:
    Boolean() : Boolean(false) {}
    Boolean(bool value) : Object(TypeKind::Bool), Value(value) {}
    Boolean(SharedObject ob) : Object(TypeKind::Bool)
    {
        if (ob->GetType() == TypeKind::Bool)
        {
            this->Value = ((Boolean *)ob.get())->Value;
        }
        else
        {
            this->Value = 0;
        }
    }

    virtual ~Boolean() {}

public:
    virtual std::string ToString() const override
    {
        if (Value)
            return "True";
        else
            return "False";
    }
};